]> dgit.raspbian.org Git - gnome-shell.git/commit
panel: Add `PanelMenu.Button` menu when `menu-set` is emitted
authorAndy Holmes <andrew.g.r.holmes@gmail.com>
Mon, 5 Sep 2022 00:21:29 +0000 (17:21 -0700)
committerMarge Bot <marge-bot@gnome.org>
Sat, 17 Sep 2022 17:56:21 +0000 (17:56 +0000)
commit990eb92bd91b08b6943ba969b0e00a4a98f75fbf
tree0b84bcc3a2572f0d000fafa003f7bc21242d0af9
parent0bd73b79a630ad1354bae3ccd69beaeba2f74d4b
panel: Add `PanelMenu.Button` menu when `menu-set` is emitted

When a `PanelMenu.Button` is added to the `statusArea`, its menu is
added to the `PopupMenuManager` if it has one at the time. If a menu is
added later or a new one set, the new menu is never added.

Move the call to `PopupMenuManager.addMenu()` from `_addToPanelBox()`
to `_onMenuSet()`, which is called when the `PanelMenu.Button` is added
and whenever it emits the `menu-set` signal.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2470>
js/ui/panel.js